//
//  ViewController.swift
//  GuideStudy
//
//  Created by tianqi on 2017/11/8.
//  Copyright © 2017年 david.com. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    @IBOutlet weak var button: UIButton!
    @IBOutlet weak var btn: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    @IBAction func buttonAction(_ sender: Any) {
        
//        UIModalPresentationFullScreen = 0,
//        UIModalPresentationPageSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,
//        UIModalPresentationFormSheet NS_ENUM_AVAILABLE_IOS(3_2) __TVOS_PROHIBITED,
//        UIModalPresentationCurrentContext NS_ENUM_AVAILABLE_IOS(3_2),
//        UIModalPresentationCustom NS_ENUM_AVAILABLE_IOS(7_0),
//        UIModalPresentationOverFullScreen NS_ENUM_AVAILABLE_IOS(8_0),
//        UIModalPresentationOverCurrentContext NS_ENUM_AVAILABLE_IOS(8_0),
//        UIModalPresentationPopover NS_ENUM_AVAILABLE_IOS(8_0) __TVOS_PROHIBITED,
//        UIModalPresentationBlurOverFullScreen __TVOS_AVAILABLE(11_0) __IOS_PROHIBITED __WATCHOS_PROHIBITED,
//        UIModalPresentationNone NS_ENUM_AVAILABLE_IOS(7_0) = -1,
        
        let b = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ViewController2")
        
//        self.definesPresentationContext  = true
        
        
//        b.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext?
//        b.modalPresentationStyle = UIModalPresentationStyle.overFullScreen
//        b.modalPresentationStyle = UIModalPresentationStyle.currentContext
//        b.modalPresentationStyle = UIModalPresentationStyle.popover
//        b.modalPresentationStyle = UIModalPresentationStyle.pageSheet
        
        
        let tstion = CATransition()
        tstion.type = kCATransitionMoveIn
        tstion.subtype = kCATransitionFromTop
        tstion.duration = 0.3
        tstion.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
        b.view.layer.add(tstion, forKey: "leftpush")
        
//        self.navigationController?.pushViewController(b, animated: true)
        
//        b.modalTransitionStyle = UIModalTransitionStyle.flipHorizontal
        b.modalPresentationStyle = UIModalPresentationStyle.custom
//        b.transitioningDelegate
        self.present(b, animated: true, completion: nil)
    }
    
}

